package com.study.teacher;

public class PayCreator {
	public static IPay createPay(int iFlag){
		IPay obj;
		if(iFlag==1){
			obj = new CashPay();
		}else if(iFlag==2){
			obj = new CreditCardPay();
		}else{
			obj = new AliPay();
		}
		
		return obj;
	}
}
